<template>
  <div class="echarts-container">
    <div ref="echarts" class="echarts-content"></div>
  </div>
</template>

<script>
import * as echarts from 'echarts';

export default {
  data() {
    return { };
  },
  mounted() {
    this.initEcharts();
  },
  methods: {
    initEcharts() {
      const myChart = echarts.init(this.$refs.echarts);
      const option = {
        title: {
          show: true,
          text: '进度',
          left:5,
          top:5
        },
        toolbox: {
          feature: {
            saveAsImage: {},
            dataView: {}
          }
        },
        series: [
          {
            type: 'gauge',
            min:20,
            max:100,
            data:[{
              name:'进度',
              value:97,
              itemStyle:{
                color:"red"
              }
            }
            // ,{
            //   value:30
            // }
            ]
          }
        ]
      }
      myChart.setOption(option);
    },
  },
};
</script>

<style lang="scss" scoped>

</style>
